[deps]

[mirrors]
http://download.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.xz
[vars]
filesize=450776
sha512=405fbb4fc9ca8a59f34488205f403e77d4f184b08d344efbec6a8f558cac0512ee6cda1dc01b7913d61d9bed04cc710e61db1081bb8782c139fcb727f586fa54

[build]
CC="$CC" CFLAGS="$optcflags -D_GNU_SOURCE -fPIC" LDFLAGS="$optldflags" \
  ./configure --prefix="$butch_prefix"
#busybox mktemp -u is broken and returns empty string
#sed -i 's,mktemp -u,mktemp,g' Makefile
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

# make install is broken
ranlib libz.a
dest="$butch_install_dir""$butch_prefix"
mkdir -p "$dest"/lib
install -m644 libz.a "$dest"/lib/
mkdir -p "$dest"/include
install -m644 zlib.h zconf.h "$dest"/include/
